package ord2.convert;

import ord2.core.AbstractFactory;

/**
 * This class is used to retrieve instances of convertes that were attached
 * to the system. Names are case-sensitive.
 *
 * @author José Ivan
 * @author Edviges
 */
public final class ConverterFactory extends AbstractFactory<String, Converter> {
    
    private static ConverterFactory instance;
    
    private ConverterFactory() {
    
        super();
    }
    
    /**
     * Gets a instance of this converter to be used.
     * @return A instance of this factory
     */
    public static ConverterFactory getInstance() {
        
        if (instance == null) {
            
            instance =  new ConverterFactory();
        }
        
        return instance;
    }
}
